<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <style>
    	body{
    		font-family:"Microsoft YaHei","Helvetica","方正兰亭黑简体",sans-serif;
    	}
	 .infoTop{
background-color:#D65B5D;
height:73px;
/* border-bottom:1px solid #994c00; */
text-align:center;
/* border:1px solid red; */	
}
.infoTop a{
	position:absolute;
	height:37px;
	padding:34px 20px 0 20px;
	top:0px;
	left:0px;
	cursor:pointer;	
}
.infoTop img{
	height:25px;
	
}
.infoTop span{
	position:absolute;
	top:24px;
	left:160px;
	font-size:20px;
	height:50px;
	line-height:50px;
	color:#fff;
	cursor:default;	
}
.infoTop .nav{
	float:left;
	width:25px;
	height:25px;
	margin:35px 15px auto 20px;
}
.infoTop1 .navtype{
	/* float:left; */
	padding:0;
	/* margin-top:34px; */
	margin-left: 20px;
	/* width:216px; */
	height:27px;
	border:1px solid #fff;
	border-radius:6px;
	 /* border:1px solid red;  */
}
.navtype .navtype-text{
	float:left;
	width:160px;
	height:25px;
	text-align:center;
	font-size:14px;
	font-weight:bold;
	line-height:25px;
	list-style:none;
	 /* border:1px solid black;  */
}
.navtype .navtype-text a{
	display:block;
	color:#fff;
	height:25px;
	text-decoration:none;
	background:#32323A;
	line-height:27px;
	border-radius:5px;
}
.navtype .navtype-text a:hover{
	color:#fff;
	text-decoration:none;
	background:#FFAEB9;
	border:1px solid #fff;
	border-radius:5px;
}

.navtype .clear{
	clear:both;
	height:0px;
	list-style:none;
}
.save-btn{
	position:fixed;
	bottom:0px;
	padding-left:59px;
	padding-right:59px;	
    height:56px;
    width:100%;
    background-color: #FFFFFF;
}
.save-btn #svBtn{
 	display:inline-block;
	height:35px;
	width:242px;
	margin-top:12px;
	border:none;
	background-color:#D65B5D;
	border-radius:10px;
	outline:none;
	color:#fff;
	font-size:16px;
	font-family:"方正兰亭黑简体","Microsoft YaHei";
	line-height:16px;
	text-align:center;
	cursor:pointer;
	text-decoration:none;
} 
    </style>
</head>
<body>
	<div class="infoTop">
	        <img class="nav" id="openMenu" src=""/>
			<!-- <a onClick="javascript :api.closeWin();"><img alt="返回" src="" title="back"></a> --> 
			<span id="tit1"></span>
	</div>
	<!--<div class="infoTop1">
	 <ul class="navtype">
			<li id="one1" class="navtype-text" >
				<a  class="orderCategory" id="orderCategory" href="javascript:chageFrames(0);" style="color:#fff;text-decoration:none;background:#FFAEB9;border:1px solid #fff;border-radius:5px;">拍照</a>
			</li>
			<li id="one2" class="navtype-text"> 
				<a  class="orderCategory" href="javascript:chageFrames(1);" >量化</a>
			</li>
			
			<li class="clear"></li>
		</ul>
	</div>-->
	<!--<div class="save-btn">
	        <button type="button" id="svBtn">确认</button>
	        </div>-->
</body>
<script type="text/javascript" src="../script/public/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/core/core.js"></script>
<script type="text/javascript">
	apiready = function(){
	var unit=api.pageParam.unit;
	var type=api.pageParam.type;
	var pro=api.pageParam.procedure;
	//var gongxu=api.pageParam.gongxu;
	$("#tit1").html(pro);
	exitApp();
	api.openFrame({
	    name: 'frm_planList',
	    url: 'frm_planList.html',
	    reload:true,
	    pageParam:{
		         unit:unit,
		         type:type,
		         pro:pro
		        },
	    rect: {
	        x: 0,
	        y: 74,
	        w: api.winWidth,
	        h: 'auto'
	    }
    });
//	api.openFrameGroup ({
//	    name: 'orderGroup',
//	    background: '#eceaeb',
//	    scrollEnabled: false,
//	    preload:2,
//	    rect: {
//	         x: 0, 
//	         y: 102, 
//	         w: api.winWidth, 
//	         h: api.winHeight-158
//	    },
//	    index: 0,
//	    frames: [{
//	        name: 'uploadPhoto', 
//	        url: 'frm_uploadPhotoList.html',
//	        bgColor: '#f0f0f0',
//	        bounces:false,
//	        pageParam:{
//		         unit:unit,
//		         type:type,
//		         pro:pro,
//		         gongxu:gongxu
//		        }
//	    },{
//	        name: 'frm_liangHua',
//          url: 'frm_liangHList.html',
//	        bgColor: '#f0f0f0',
//	        bounces:false,
//	        reload:true,
//	        pageParam:{
//		         unit:unit,
//		         type:type,
//		         pro:pro,
//		         gongxu:gongxu
//		        }
//	    }]
//	}, function(ret, err){
//	//alert(JSON.stringify(ret));
//	   
//	});
//	api.setFrameGroupIndex({
//	    name: 'orderGroup',
//	    index: 0,
//	    scroll: false,
//	    reload:true
//	});
	
	
	
		//右滑打开菜单
	api.addEventListener({
		    name:'swiperight'
		}, function(ret, err){ 
			var checkUser = $api.getStorage("isCheck"); 
			//alert(checkUser);   
			if(checkUser=="DJCX"){    
			   api.openFrame({
		           name: 'leftMenu',
		           url: 'frm_leftMenu.html',
		           rect: {
			           x:0,
			           y:0,
			           w:api.winWidth/2,
			           h:api.winHeight
		           }
	           });
	         }else if(checkUser=="XJCX"){
	         	api.openFrame({
	           name: 'leftMenu3D',
	           url: 'frm_leftMenu3D.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="DJSCL"){
	         	api.openFrame({
	           name: 'leftMenuDS',
	           url: 'frm_leftMenuDS.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="XJSCL"){
	         	api.openFrame({
	           name: 'leftMenuXS',
	           url: 'frm_leftMenuXS.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="DJJZ"){
	         	api.openFrame({
	           name: 'leftMenuDJ',
	           url: 'frm_leftMenuDJ.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="XJJZ"){
	         	api.openFrame({
	           name: 'leftMenuXJ',
	           url: 'frm_leftMenuXJ.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }
		});
		$("#openMenu").click(function(){	
		 	var checkUser = $api.getStorage("isCheck"); 
			//alert(checkUser);   
			if(checkUser=="DJCX"){    
			   api.openFrame({
		           name: 'leftMenu',
		           url: 'frm_leftMenu.html',
		           rect: {
			           x:0,
			           y:0,
			           w:api.winWidth/2,
			           h:api.winHeight
		           }
	           });
	         }else if(checkUser=="XJCX"){
	         	api.openFrame({
	           name: 'leftMenu3D',
	           url: 'frm_leftMenu3D.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="DJSCL"){
	         	api.openFrame({
	           name: 'leftMenuDS',
	           url: 'frm_leftMenuDS.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="XJSCL"){
	         	api.openFrame({
	           name: 'leftMenuXS',
	           url: 'frm_leftMenuXS.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="DJJZ"){
	         	api.openFrame({
	           name: 'leftMenuDJ',
	           url: 'frm_leftMenuDJ.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }else if(checkUser=="XJJZ"){
	         	api.openFrame({
	           name: 'leftMenuXJ',
	           url: 'frm_leftMenuXJ.html',
	           rect: {
		           x:0,
		           y:0,
		           w:api.winWidth/2,
		           h:api.winHeight
	           }
           });
	     }
	    });
	    
	    
	    //点击确认键
//		$("#svBtn").click(function(){
//			//alert("1111");
//		    api.execScript({
//		        //name: 'mainList',
//			    frameName: 'frm_liangHua',
//				script: 'saveLH();'//"alert('1112');"//
//			});
//		});
	}
	
	function chageFrames(indexNum)
{
	if(indexNum!='0')
	{
		$("#orderCategory").css("color","#fff");
		$("#orderCategory").css("border","0px");
		$("#orderCategory").css("background","#32323A");
	}
	else
	{
		$("#orderCategory").css("color","#fff");
		$("#orderCategory").css("background","#FFAEB9");
		$("#orderCategory").css("border","1px solid #fff");
	}
	if(indexNum!=3){
		api.setFrameGroupIndex({
		    name: 'orderGroup',
		    index: indexNum,
		    scroll: false,
		    reload: true
		});
	}
}
function exitApp(){
            api.addEventListener({
                name: 'keyback'
            }, function(ret, err){
                api.toast({
                        msg: '再按一次返回键退出'+api.appName,
                        duration:2000,
                        location: 'bottom'
                    })
                    api.addEventListener({
                        name: 'keyback'
                    }, function(ret, err){
                        api.closeWidget({
                                id: 'A6908652188489',     //这里改成自己的应用ID
                                retData: {name:'closeWidget'},
                                silent:true
                            });
                    });
                   
                    setTimeout(function(){
                            exitApp();
                    },3000)
            });
    }
    
    	    
</script>
</html>